package aop03;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.Date;

public class WelcomeAdvice implements AfterReturningAdvice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("在"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+"时间，请求结束了"+target+" 中"+method.getName()+"方法返回值为"+returnValue);

    }
}
